package com.fenda.reflect;

/**
 * Created by huanggc on 2019/11/7.
 */
public class Student extends Object{


    private String name;
    private int age;
    private int length;

    public Student(String name){
        this.name = name;
    }

     Student() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public void chifan(String what,int price){
        System.out.println(name + "吃" + what + "花了"  + price);
    }

    public void chifan(String what){
        System.out.println(name + "吃" + what);
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", length=" + length +
                '}';
    }
}
